package com.ruoyi.classai.service.impl;

import com.ruoyi.classai.domain.dto.ModuleLessonPreparationModificationDto;
import com.ruoyi.classai.domain.vo.*;
import com.ruoyi.classai.mapper.ClassStatisticsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClassStatisticsService {
    @Autowired
    private ClassStatisticsMapper classStatisticsMapper;

    public ClassStatisticsVo getClassStatistics(ModuleLessonPreparationModificationDto moduleLessonPreparationModificationDto) {
        ClassStatisticsVo statistics = classStatisticsMapper.getClassStatistics(moduleLessonPreparationModificationDto);
        List<StudentScoreVo> maleScores = classStatisticsMapper.getMaleScores(moduleLessonPreparationModificationDto);
        List<StudentScoreVo> femaleScores = classStatisticsMapper.getFemaleScores(moduleLessonPreparationModificationDto);
        statistics.setMaleScores(maleScores);
        statistics.setFemaleScores(femaleScores);
        return statistics;
    }

    public List<LearningSituationAnalysisClassDetailVo> getLearningSituationAnalysisClassDetailVo(ModuleLessonPreparationModificationDto moduleLessonPreparationModificationDto) {
        List<LearningSituationAnalysisClassDetailVo> learningSituationAnalysisClassDetailVo = classStatisticsMapper.getLearningSituationAnalysisClassDetailVo(moduleLessonPreparationModificationDto);
        return learningSituationAnalysisClassDetailVo;
    }


    public List<LessonPreparationFirstVo> queryingFirstLevelLessonPreparation(ModuleLessonPreparationModificationDto moduleLessonPreparationModificationDto) {
        List<LessonPreparationFirstVo> lessonPreparationFirstVo = classStatisticsMapper.queryingFirstLevelLessonPreparation(moduleLessonPreparationModificationDto);
        return lessonPreparationFirstVo;
    }


}
